<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td valign="top">
        <div class='listmoduleleft'>
			<?php echo $listcatmodunle?>
        </div>
		</td>
		<td valign="top" width="80%" style="border-left:1px solid #dddddd;">
<?php
if(count($categories)>0)
{
?>
	<form name="form_admin" method="post" action="<?php echo formAction('updatestatus')?>" >
	<table width="100%" border="0" cellpadding="4" cellspacing="1" id="tblsort">
		<tr class="headtb" nodrop="true" nodrag="true">
			<td width="5%" ><?php echo getLang('Order')?></td>
			<td width="20%" ><?php echo getLang('Name')?></td>
			<td width="10%" ><?php echo getLang('Status')?></td>
			<td width="20%" ><?php echo getLang('Actions')?></td>
			<td></td>
		</tr>
	   <?php
		foreach($categories as $i => $category)
		{
		?>
			<tr>
				<td align="center">
					<input class="ordertext" id="listorder_<?php echo $i?>" name="listorder[]"
					value="<?php echo getOrderList($i)?>"/>
				</td>
				<td nowrap="nowrap" style="padding-left:10px" valign="middle">
                    <?php echo linkAction('edit',$category['cName'],'id='.$category['iId'])?>
					<input type="hidden" name="listid[]" value="<?php echo $category['iId']?>" />
				</td>
				<td align="center">
					<select id="liststatus_<?php echo $i?>" name="liststatus[]">
						<?php echo liststatus($category["iStatus"]) ?>
					</select>
				</td>

				<td align="center">
					<?php echo linkAction('edit',getLang('Edit'),'id='.$category['iId'])?> -
                    <?php echo linkAction('delete',getLang('Delete'),'id='.$category['iId'])?>
				</td>
				<td></td>
			</tr>
		<?php
		}
		?>
		</table>
		</form>
		<script type="text/javascript">
		(new TableDnD).init("tblsort");
		</script>
<?php
}
else
{
?>
	<form name="form_admin" method="POST" action="<?php echo formAction('updatecontent')?>">
		<table width="100%" cellpadding="4" cellspacing="1" id="tblsort">
			<tr class="headtb" nodrop="true" nodrag="true">
				<td width="5%" ><?php echo getLang('Image')?></td>
				<td width="20%" ><?php echo getLang('Name')?></td>
				<td width="5%" ><?php echo getLang('Status')?></td>
				<td width="20%" ><?php echo getLang('Actions')?></td>
				<td></td>
			</tr>
		<?php
		foreach($contents as $i => $content)
		{
		?>
		<tr>
			<td><IMG style="cursor: pointer;" onclick="openPI('file','../<?php echo $folder_img_upload?><?php echo $content['cImage']?>',400,300)"
                    src="../<?php echo $folder_img_upload?><?php echo $content['cThumb']?>" width="30" height="30"></td>
			<td>
			<input type="hidden" name="ListId[]" value="<?php echo $content['iId']?>"/>
			<input type="text" class="noedit" style="width:300px" name="ListName[]" value="<?php echo $content['cName']?>" />
			</td>
			<td>
				<select name="liststatus[]">
					<?php echo liststatus($content['iStatus'])?>
				</select>
			</td>
			<td>
                <?php echo linkAction('delcontent',getLang('Delete'),'id='.$content['iId'])?>
			     <span id="divdel_<?php echo $content['iId']?>"></span>
			</td>
			<td></td>
		</tr>
		<?php
		}
        if(count($contents)==0)
        {
        ?>
            <tr nodrop="true" nodrag="true">
                <td align="center" colspan="4"><font color="Red"><?php echo getLang('Not found content')?></font></td>
            </tr>
        <?php
}
		?>
		</table>
		<?php echo $show_page?>
	</form>
	<script>
        for(i in $ES(".noedit"))
        {
            var elob=$ES(".noedit")[i];
            elob.onfocus=function(){this.oldtext=this.value;this.className='normal'};
        	elob.onblur=function(){if(this.value=='')this.value=this.oldtext;this.className='noedit'};
        }
	</script>
<?php
}
?>
		</td>
	</tr>
</table>